package com.study.d6_io_buffer;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.Reader;

public class CharDemo {
    public static void main(String[] args) {
        //目标：字符缓冲输入流的使用：提升原始字符输入流的读字符性能，多了按照行读取的能力
        try (
                Reader re = new FileReader("day10/src/dlei6.txt");
                BufferedReader br = new BufferedReader(re);
        ) {
            //多了按照行读取的能力
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
